Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support multiple external VPN peering gateways #119

Merged
merged 6 commits into from
Sep 11, 2023
Merged

feat: support multiple external VPN peering gateways #119

merged 6 commits into from
Sep 11, 2023

Conversation

doniz
Copy link
Contributor

@doniz doniz commented Sep 5, 2023

Hello,

we would like to add this feature because we see that we could have many VPN peering gateways on selected tunnels in the GCP console without any issue, but this Terraform module does not support that.

In our case, we have an HA VPN that is connected to 2 on-premise DCs and instead of creating a new VPN instance, we may create a new tunnel that is linked to the specific peering gateway.

First, I thought to redo the variable of peer_external_gateway to set list(object..., but I realized it became very complicated from Terraform's point of view. So I added an optional element peer_external_gateway_self_link in the tunnels list object, so we could pass a custom resource self_link and set var.peer_external_gateway to null to prevent creating resource inside of the module.

Feedback is welcome.
Thank you, Donatas

@doniz doniz requested review from imrannayer and a team as code owners September 5, 2023 07:03
@doniz doniz changed the title Support multiple external VPN peering gateways feat: support multiple external VPN peering gateways Sep 5, 2023
@doniz
Copy link
Contributor Author

doniz commented Sep 6, 2023

@imrannayer can I get approval?

@imrannayer
Copy link
Collaborator

imrannayer commented Sep 6, 2023

@doniz thanks for the PR. Can you also add an example in examples folder. Follow same pattern as vpn_ha but change it for gcp to on-prem with multiple external vpn gateways.
You can put the example you added in README file. Just make sure you test it.

@imrannayer
Copy link
Collaborator

/gcbrun

@doniz
Copy link
Contributor Author

doniz commented Sep 7, 2023

@doniz thanks for the PR. Can you also add an example in examples folder. Follow same pattern as vpn_ha but change it for gcp to on-prem with multiple external vpn gateways. You can put the example you added in README file. Just make sure you test it.

Ok, will do today.

@doniz
Copy link
Contributor Author

doniz commented Sep 11, 2023

Hi @imrannayer, I added an example and I wonder about creating in GCP 2 additional VPNs to reproduce 2 On-Premise DCs, but this needs a lot more time investment by creating external IPs. I think it's doable, but it becomes the same as examples/vpn_ha (GCP to GCP) just through the global external VPN GW IP.

Let me know if that's good enough.

@imrannayer
Copy link
Collaborator

/gcbrun

@imrannayer imrannayer merged commit c51aee7 into terraform-google-modules:master Sep 11, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants